<?php

namespace Trawind\Remotes\Contracts\Repositories\Account\Config;

use Prettus\Repository\Contracts\RepositoryInterface;

/**
 * Interface CommonRepository.
 *
 * @package namespace TrawindCloud\Contracts\Repositories;
 */
interface UserRepository extends RepositoryInterface
{

    /**
     * Get the current cache configuration, update if there is none in the cache
     *
     * @return mixed
     * @throws \Prettus\Repository\Exceptions\RepositoryException
     */
    public function getData();


    /**
     * Get all the current configuration of the user
     *
     * @param string|null $key
     * @throws \Prettus\Repository\Exceptions\RepositoryException
     */
    public function getUserConfig(?string $key=null);


    /**
     * Create or modify user configuration in batches
     *
     * @param array $configs
     * @return mixed|void
     */
    public function saveConfig(array $configs);


    /**
     * get user language configuration
     *
     * @return mixed|null
     * @throws \Prettus\Repository\Exceptions\RepositoryException
     */
    public function getLanguage();

}
